package com.xuxin.baby.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xuxin.baby.R;
import com.xuxin.baby.bean.ChildVaccineBean;
import com.xuxin.baby.bean.ChildVaccineHistoryBean;
import com.xuxin.baby.utils.BaseUtils;

import org.jetbrains.annotations.NotNull;

/**
 * Created by xu_xin
 * Created on 2020/11/18 0018
 * 疫苗
 */
public class ChildVaccineHistoryAdapter extends BaseQuickAdapter<ChildVaccineHistoryBean.ResultBean.ItemsBean, BaseViewHolder> {

    public ChildVaccineHistoryAdapter() {
        super(R.layout.item_child_vaccine_history);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, ChildVaccineHistoryBean.ResultBean.ItemsBean item) {
        holder.setText(R.id.item_child_vaccine_history_name, "疫苗名称：" + item.getTVaccines().getName());
        holder.setText(R.id.item_child_vaccine_history_time, "接种时间："+ BaseUtils.getTime(item.getActDate()));
        holder.setText(R.id.item_child_vaccine_history_hospital, "接种医院："+item.getHospital());
    }
}